boxt
![](https://img.shields.io/badge/source--000000.svg?logo=github&style=social)
![boxt](https://user-images.githubusercontent.com/516342/34468260-c7ab5682-ef0d-11e7-8a84-c9baa16cabaa.png)
![boxt](https://user-images.githubusercontent.com/516342/35348313-5c858bf8-0140-11e8-9cee-a8336896f56a.png)
Use
npm i -S boxt
const boxt = require('boxt');
boxt(`I have a message
It might be multilined`);
Options
boxt(
'Guests, like fish, begin to smell after three days.',
{
color: 'green',
theme: 'round',
padding: 4,
align: 'center',
minWidth: 100
}
);
option | meaning | values |
---|
title | A title | And string |
theme | border style | 'single' (default), 'double', 'round' |
color | border colour | see chalk on NPM |
padding | space from borders to text | |
align | Where to align the lines | 'center' (default), 'left'/'start', 'right'/'end' |
minWidth | Minimal width | any number or 'full' for full terminal width |
Examples
options | result |
---|
theme: 'double' color: 'bgBlue' | ![example](https://user-images.githubusercontent.com/516342/34468263-dcb7e87e-ef0d-11e7-9ae6-1f44d144a1b1.png) |
theme: 'round' color: 'green' | ![example](https://user-images.githubusercontent.com/516342/34468268-f85f6d40-ef0d-11e7-9fc5-746cd20f4e25.png) |
padding: 10 align: 'left' | ![example](https://user-images.githubusercontent.com/516342/35336411-01797bb2-0121-11e8-931f-03a7ff9df225.png) |
title 'I am the title'.bold | ![example](https://user-images.githubusercontent.com/516342/36678556-c1d0ead2-1b19-11e8-8fb5-1557e3cf907e.png) |